#ifndef _SIM_PARAMETERS_H_
#define _SIM_PARAMETERS_H_

#define RENDER
//#define PRINT_DEBUG

// auxiliar macro
#define CEILING(X) (X-(int)(X) > 0 ? (int)(X+1) : (int)(X))

/******************************************************************************
 *  INTEGRATION PARAMETERS
 *****************************************************************************/
#define FIXED_TIME_STEP 0.005f

/******************************************************************************
 *  AMBIENT PARAMETERS
 *****************************************************************************/
#define GRAVITY          9.8f
#define COLLISON_DAMPING 0.75f
#define RESTITUTION      (1.0f-COLLISON_DAMPING)

/******************************************************************************
 *  PARTICLE PARAMETERS
 *****************************************************************************/
#define NUM_PARTICLES    1000
#define MAX_RADIUS       1.5f
#define MIN_RADIUS       1.5f

/******************************************************************************
 *  GRID PARAMETERS
 *****************************************************************************/
#define CELL_DIM          1.0f
#define CELL_NUM          50
#define MAX_OVERLAP_1DIM  (CEILING( 2+((2*MAX_RADIUS - CELL_DIM)/CELL_DIM) ))
#define MAX_OVERLAPS      (MAX_OVERLAP_1DIM * MAX_OVERLAP_1DIM * MAX_OVERLAP_1DIM)
#define BOX_DIM           (CELL_NUM * CELL_DIM)
#define CELL_TOTAL        (CELL_NUM*CELL_NUM*CELL_NUM)
#define BOX_ORIGIN_X      (BOX_DIM/(-2.0f))
#define BOX_ORIGIN_Y      0
#define BOX_ORIGIN_Z      BOX_ORIGIN_X
#define BOX_ORIGIN_VEC    (make_float3(BOX_ORIGIN_X, BOX_ORIGIN_Y, BOX_ORIGIN_Z))

#endif /* _SIM_PARAMETERS_H_ */